#ifndef WIR_H_
#define WIR_H_

#include "recbase.h"
#include "rectype.h"
#include "stdffield.h"

namespace opsrc {
    namespace stdf {

        class Wir : public opsrc::stdf::RecBase
        {
        public:
            Wir(stdf_rec stdfrec,  int reclen, std::ios::pos_type fileRecFirstBytePosition, int orderindex, endian e, char* buf);
            virtual ~Wir();

            const StdfField<int> getHeadNum() const;
            void setHeadNum(StdfField<int> headnum);

            const StdfField<int> getSiteGroup() const;
            void setSiteGroup(StdfField<int> sitegrp);

            const StdfField<long> getStartTime() const;
            void setStartTime(StdfField<long> startt);

            const StdfField<string> getWaferId() const;
            void setWaferId(StdfField<string> waferid);

            void readFields(char *buf);

        protected:
            Wir();

        private:
            StdfField<int> head_num;
            StdfField<int> site_grp;
            StdfField<long> start_t;
            StdfField<string> wafer_id;
            endian en;
            bool decodeFields;

        };

    }	// namespace stdf
}		// namespace opsrc

#endif /*WIR_H_*/
